package sun.scheduler.util.graph.algorithm.maxflow;

import sun.scheduler.util.graph.Graph;
import sun.scheduler.util.graph.Node;


/**
 * Interface for a MaxFlow algorithm, that extends the Runnable Interface.
 * The whole algorithm Process should be performed in the runnable method,
 * while the output is a modified graph, such that the flow is a maximum flow.
 * @param <N> The generic data content {@see Node} of the {@see Graph}.
 * @author mfj
 */
public interface MaxFlowAlgorithm extends Runnable
{
    /**
     * Gets the graph with a modified max flow.
     * @return
     */
    public ResidualGraph getResidualGraph();
    
    /**
     * Get the start node.
     * @return 
     */
    public Node getSource();
    
    /**
     * Get the end node.
     * @return 
     */
    public Node getTarget();
    
    /**
     * Gets the computed flow.
     * @return the floe computed by this algorithm.
     */
    public double getFlow();
}
